

var api     = require('../../utils/api.js');
var WxParse = require('../../wxParse/wxParse.js');
var app     = getApp();


Page({

    /**
     * 页面的初始数据
     */
    data: {
        id:'',
        content:''
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

        var id=options.id;
        var that=this;

        api.get({
            url: 'index/getxieyi',
            data: {},
            success: data => {
                
                if(id==1){
                    wx.setNavigationBarTitle({
                        title: ' 陪诊服务协议 '
                      });
                      WxParse.wxParse('articleContent', 'html', data.data.acontent, this, 30);
                }else if(id==2){
                    wx.setNavigationBarTitle({
                        title: ' 陪诊服务责任豁免声明 '
                      });

                      WxParse.wxParse('articleContent', 'html', data.data.bcontent, this, 30);
                 
                    // that.setData({
                    //     content:html
                    // })
                }else if(id==3){
                    wx.setNavigationBarTitle({
                        title: ' 医疗信息安全承诺书 '
                      });
                      WxParse.wxParse('articleContent', 'html', data.data.ccontent, this, 30);
                }else if(id==4){
                    wx.setNavigationBarTitle({
                        title: ' 证件真实性保证声明 '
                      });
                      WxParse.wxParse('articleContent', 'html', data.data.dcontent, this, 30);
                }else if(id==5){
                    wx.setNavigationBarTitle({
                        title: ' 急救场景操作指引 '
                      });
                      WxParse.wxParse('articleContent', 'html', data.data.econtent, this, 30);
                }
            }
        })

      
    },

    
})